import random


class ProxyPool:
    """
    代理池
    """

    # 星宿云代理
    proxy_xingsu = "http://%(user)s:%(pass)s@%(host)s:%(port)s" % {
        "host": "dynamic05.xingsudaili.com",
        "port": "10010",
        "user": "dsg384177",
        "pass": "dsg384177",
    }

    # Proxy302代理
    proxy_302 = ""

    @staticmethod
    def random():
        """
        随机选择一个代理
        """
        return random.choice([ProxyPool.proxy_xingsu, ProxyPool.proxy_302])
